export const initStorage = {
  usrData: {},
  sysInfo: {},
  userInfo: {},
  myLocation: null,
  shops: [],
  qrSids: [],
  typeList: [],
  cartChecked: [],
  cartList: [],
  shopId: 1,
  pickAddr: {},
  pickCoupon: {},
};

export const initState = {
  windowWidth: null,
  windowHeight: null,
  keyboardHeight: 0,
  nowDate: new Date(),
  isFocus: true,
  theme: "light",
  noticeMsg: {},
  appShow: true,
  bleParams: null,
  bleUuid: {},
  nfcList: [],
  isDark: false,
  isHome: true,
  isDls: false, // 账号是否代理商
};

export const getters = {
  cartNum(state) {
    let total = 0;
    for (const it of state.cartList) {
      total += it.num;
    }
    return total;
  },
};
